package com.byl.sdk.bean;

/**
 * Created by Administrator on 2018/3/13.
 */
public class ResultBean {
    private int page; //当前第几页
    private int pageSize;//每页记录数
    private int total; // 总记录数
    private Object data;  // 分页结果集
    private int totalPage;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public ResultBean(int page, int pageSize, int total, Object data) {
        this.page = page;
        this.pageSize = pageSize;
        this.total = total;
        this.data = data;
        this.totalPage=this.total%this.pageSize==0?(this.total/this.pageSize):(this.total/this.pageSize+1);
    }

    public ResultBean() {
    }
}
